#pragma once
#include "TViewRT.h"
#include "TViewDS.h"
#include "TViewPort.h"
#include "TShape.h"
#include "TCamera.h"

class TMiniMap
{
public:
	TCamera								m_TopView;
	TShape*								m_pPlaneShape;
	TViewRT*							m_pMiniMapRT;
	TViewDS*							m_pMiniMapDS;
	TViewPort							m_TextureVP;	

	ID3D10RenderTargetView*				m_pOldRT;
    ID3D10DepthStencilView*				m_pOldDS;
	UINT								m_nViewPorts;
	D3D10_VIEWPORT						m_vpOld[D3D10_VIEWPORT_AND_SCISSORRECT_MAX_INDEX];

public:
	ID3D10DepthStencilState*			m_pDepthStencilState;
	ID3D10BlendState*					m_pSrcNoBlend;
public:
	bool								Create(	ID3D10Device* pd3dDevice, 
												D3DXVECTOR3 vEye = D3DXVECTOR3( 0.0f, 70.0f,0.0f ), 
												D3DXVECTOR3 vTarget= D3DXVECTOR3( 0.0f, 00.0f,0.1f ));
	bool								Frame();
	bool								Render(ID3D10Device* pd3dDevice);
	bool								Release();
		
	bool								BeginRender(ID3D10Device* pd3dDevice);
	bool								EndRender(ID3D10Device* pd3dDevice);

	HRESULT								CreateViewResource(ID3D10Device* pd3dDevice, UINT iWidth, UINT iHeight);
	HRESULT								DeleteViewResource();
public:
	TMiniMap(void);
	~TMiniMap(void);
};
